<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8" />
    <title></title>
    <style>
      @import url("static/css/googleapis.css");

      table,
      th,
      td {
        border: 1px solid black;
        border-collapse: collapse;
      }
    </style>
  </head>
  <body style="font-family: 'Roboto', sans-serif">
    <div style="width: 90%; margin: 20px auto">
      <section style="margin: 0 15px; color: #425b76">
        <p style="font-size: 15.5px">Dear {{user}},</p>
        <p style="font-size: 15.5px">
          Please be reminded that the following orders are non-active and have
          been inactive for more than 3 days. Kindly review and take necessary
          actions:
        </p>

        <table style="width: 100%; font-size: 15.5px">
          <tr>
            <th>Parent WO No./
              Line Work Order:
              </th>
            <th>CEWS Work Order(WO) NO.</th>
            <th>Stockcode</th>
            <th>Serial No</th>
            <th>Description</th>
            <th>Last Active Date</th>
          </tr>
          {% for r_obj in r_objs %}
          <tr>
            <td style="text-align: center;  white-space: wrap; word-wrap: break-word; vertical-align: middle; max-width: 300px;">
              {{r_obj.parent_work_order_no|default:''}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{r_obj.work_order_no|default:''}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{r_obj.primary_part.stock_code}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{r_obj.primary_part.serial_no}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{r_obj.eqpt_description}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{r_obj.last_action_date|date:"Y-m-d"}}
            </td>
          </tr>
          {% endfor %}
        </table>

        <br />
        <p style="font-size: 15.5px">Thank you.</p>

        <p style="font-size: 15.5px">Best regards</p>
      </section>
    </div>
  </body>
</html>
